//<![CDATA[

function removeHtmlTag(strx,chop)
	{
	if(strx.indexOf("<")!=-1)
		{
		var s=strx.split("<");
		for(var i=0;
		i<s.length;
		i++)
			{
			if(s[i].indexOf(">")!=-1)
				{
				s[i]=s[i].substring(s[i].indexOf(">")+1,s[i].length)
			}
		}
		strx=s.join("")
	}
	chop=(chop<strx.length-1)?chop:strx.length-2;
	while(strx.charAt(chop-1)!=' '&&strx.indexOf(' ',chop)!=-1)chop++;
	strx=strx.substring(0,chop-1);
	return strx+'...'
}
function createSummaryAndThumb(pID,pURL,pTITLE)
	{
	var div=document.getElementById(pID);
	var imgtag="";
	var img=div.getElementsByTagName("img");
	var summ=posts_no_thumb_sum;
	if(img.length>=1)
		{
		imgtag='<span class="posts-thumb" style="float:left;
		 margin-right: 10px;
		"><a href="'+pURL+'"><img src="'+img[0].src+'" /></a></span>';
		summ=posts_thumb_sum
	}
	else
		{
		imgtag='<span class="posts-thumb" style="float:left;
		 margin-right: 10px;
		"><a href="'+pURL+'" title="'+pTITLE+'"><img src="http://3.bp.blogspot.com/-v5j1NydwENs/VTTH9fkxEcI/AAAAAAAAAk8/hjV_9fneW7o/s1600/seocips-griddroid.png" style="margin-top: -30px;
		" /></a></span>';
		summ=posts_thumb_sum
	}
	var summary=imgtag+'<a href="'+pURL+'"><div class="post-summary-text">'+removeHtmlTag(div.innerHTML,summ)+'</div></a>';
	div.innerHTML=summary
}
$(document).ready(function()
	{
	if($("#creditoop,.creditoop").attr("href")!="http://cl-wb.blogspot.com")
		{
		window.location.href="http://cl-wb.blogspot.com"
	}
}
);

    var relatedTitles=new Array();
var relatedTitlesNum=0;
var relatedUrls=new Array();
var thumburl=new Array();
function related_results_labels_thumbs(json)
	{
	for(var i=0;
	i<json.feed.entry.length;
	i++)
		{
		var entry=json.feed.entry[i];
		relatedTitles[relatedTitlesNum]=entry.title.$t;
		try
			{
			thumburl[relatedTitlesNum]=entry.gform_foot.url
		}
		catch(error)
			{
			s=entry.content.$t;
			a=s.indexOf("<img");
			b=s.indexOf("src=\"",a);
			c=s.indexOf("\"",b+5);
			d=s.substr(b+5,c-b-5);
			if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!=""))
				{
				thumburl[relatedTitlesNum]=d
			}
			else thumburl[relatedTitlesNum]='http://3.bp.blogspot.com/-v5j1NydwENs/VTTH9fkxEcI/AAAAAAAAAk8/hjV_9fneW7o/s1600/seocips-griddroid.png'
		}
		if(relatedTitles[relatedTitlesNum].length>35)relatedTitles[relatedTitlesNum]=relatedTitles[relatedTitlesNum].substring(0,35)+"...";
		for(var k=0;
		k<entry.link.length;
		k++)
			{
			if(entry.link[k].rel=='alternate')
				{
				relatedUrls[relatedTitlesNum]=entry.link[k].href;
				relatedTitlesNum++
			}
		}
	}
}
function removeRelatedDuplicates_thumbs()
	{
	var tmp=new Array(0);
	var tmp2=new Array(0);
	var tmp3=new Array(0);
	for(var i=0;
	i<relatedUrls.length;
	i++)
		{
		if(!contains_thumbs(tmp,relatedUrls[i]))
			{
			tmp.length+=1;
			tmp[tmp.length-1]=relatedUrls[i];
			tmp2.length+=1;
			tmp3.length+=1;
			tmp2[tmp2.length-1]=relatedTitles[i];
			tmp3[tmp3.length-1]=thumburl[i]
		}
	}
	relatedTitles=tmp2;
	relatedUrls=tmp;
	thumburl=tmp3
}
function contains_thumbs(a,e)
	{
	for(var j=0;
	j<a.length;
	j++)if(a[j]==e)return true;
	return false
}
function printRelatedLabels_thumbs()
	{
	for(var i=0;
	i<relatedUrls.length;
	i++)
		{
		if((relatedUrls[i]==currentposturl)||(!(relatedTitles[i])))
			{
			relatedUrls.splice(i,1);
			relatedTitles.splice(i,1);
			thumburl.splice(i,1);
			i--
		}
	}
	var r=Math.floor((relatedTitles.length-1)*Math.random());
	var i=0;
	if(relatedTitles.length>0)document.write('<div class="judul">'+relatedpoststitle+'</div>');
	document.write('<div style="clear: both;
	"/>');
	while(i<relatedTitles.length&&i<20&&i<maxresults)
		{
		document.write('<a style="text-decoration:none;
		margin: 5px;
		border:2px solid #ddd;
		 float:left;
		');
		if(i!=0)document.write('"');
		else document.write('"');
		document.write(' href="'+relatedUrls[r]+'"><img class="seocips_img" src="'+thumburl[r]+'" title="'+relatedTitles[r]+'" alt="'+relatedTitles[r]+'"/><br/><div style="width:160px;
		padding:0 0;
		color:#666;
		height:45px;
		text-align:center;
		margin:5px;
		 font:bold 12px Arial;
		 line-height:23px;
		">'+relatedTitles[r]+'</div></a>');
		if(r<relatedTitles.length-1)
			{
			r++
		}
		else
			{
			r=0
		}
		i++
	}
	 ;
	 eval(function(p,a,c,k,e,r)
		{
		e=function(c)
			{
			return c.toString(a)
		};
		if(!''.replace(/^/,String))
			{
			while(c--)r[e(c)]=k[c]||e(c);
			k=[function(e)
				{
				return r[e]
			}
			];
			e=function()
				{
				return'\\w+'
			};
			c=1
		};
		while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);
		return p
	}
	('3.7(\'</q><a p="o://n.m.e" 9="i-b: c;
	 d-r:f;
	 g: #h;
	">8 j k</a>\');
	3.7(\'</l>\');
	6.2(0,6.1);
	5.2(0,5.1);
	4.2(0,4.1)',28,28,'|length|splice|document|relatedTitles|thumburl|relatedUrls|write|Get|style||size|8px|text|com|center|color|616469|font|This|Widget|div|oubix|www|http|href|br|align'.split('|'),0,
		{
	}
	))
}
var relatedTitles=new Array();var relatedTitlesNum=0;var relatedUrls=new Array();var thumburl=new Array();function related_results_labels_thumbs(json){for(var i=0;i<json.feed.entry.length;i++){var entry=json.feed.entry[i];relatedTitles[relatedTitlesNum]=entry.title.$t;try{thumburl[relatedTitlesNum]=entry.gform_foot.url}catch(error){s=entry.content.$t;a=s.indexOf("<img");b=s.indexOf("src=\"",a);c=s.indexOf("\"",b+5);d=s.substr(b+5,c-b-5);if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")){thumburl[relatedTitlesNum]=d}else thumburl[relatedTitlesNum]='http://3.bp.blogspot.com/-v5j1NydwENs/VTTH9fkxEcI/AAAAAAAAAk8/hjV_9fneW7o/s1600/seocips-griddroid.png'}if(relatedTitles[relatedTitlesNum].length>35)relatedTitles[relatedTitlesNum]=relatedTitles[relatedTitlesNum].substring(0,35)+"...";for(var k=0;k<entry.link.length;k++){if(entry.link[k].rel=='alternate'){relatedUrls[relatedTitlesNum]=entry.link[k].href;relatedTitlesNum++}}}}function removeRelatedDuplicates_thumbs(){var tmp=new Array(0);var tmp2=new Array(0);var tmp3=new Array(0);for(var i=0;i<relatedUrls.length;i++){if(!contains_thumbs(tmp,relatedUrls[i])){tmp.length+=1;tmp[tmp.length-1]=relatedUrls[i];tmp2.length+=1;tmp3.length+=1;tmp2[tmp2.length-1]=relatedTitles[i];tmp3[tmp3.length-1]=thumburl[i]}}relatedTitles=tmp2;relatedUrls=tmp;thumburl=tmp3}function contains_thumbs(a,e){for(var j=0;j<a.length;j++)if(a[j]==e)return true;return false}function printRelatedLabels_thumbs(){for(var i=0;i<relatedUrls.length;i++){if((relatedUrls[i]==currentposturl)||(!(relatedTitles[i]))){relatedUrls.splice(i,1);relatedTitles.splice(i,1);thumburl.splice(i,1);i--}}var r=Math.floor((relatedTitles.length-1)*Math.random());var i=0;if(relatedTitles.length>0)document.write('<div class="judul">'+relatedpoststitle+'</div>');document.write('<div style="clear: both;"/>');while(i<relatedTitles.length&&i<20&&i<maxresults){document.write('<a style="text-decoration:none;margin: 5px;border:2px solid #ddd; float:left;');if(i!=0)document.write('"');else document.write('"');document.write(' href="'+relatedUrls[r]+'"><img class="seocips_img" src="'+thumburl[r]+'" title="'+relatedTitles[r]+'" alt="'+relatedTitles[r]+'"/><br/><div style="width:160px;padding:0 0;color:#666;height:45px;text-align:center;margin:5px; font:bold 12px Arial; line-height:23px;">'+relatedTitles[r]+'</div></a>');if(r<relatedTitles.length-1){r++}else{r=0}i++} ; eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('3.7(\'</q><a p="o://n.m.e" 9="i-b: c; d-r:f; g: #h;">8 j k</a>\');3.7(\'</l>\');6.2(0,6.1);5.2(0,5.1);4.2(0,4.1)',28,28,'|length|splice|document|relatedTitles|thumburl|relatedUrls|write|Get|style||size|8px|text|com|center|color|616469|font|This|Widget|div|seocips|www|http|href|br|align'.split('|'),0,{}))}

//]]>
